<?php defined('SYSPATH') or die('No direct script access.');
 
class Model_Package extends Model {

	 protected $_table = 'packages';

    public function getAll() {
        $sql = "select * from packages";
        return DB::query(Database::SELECT, $sql)->execute()->as_array();
    }

    public function getItems($parent) {
    	$query = DB::select()
			->from($this->_table)
			->where('parent','=',$parent)
			->execute();
		return $query;
    }

}